import axios from "axios";

const request=axios.create({
    baseURL:'http://localhost:8090',
    timeout:30000
})
//
request.interceptors.request.use(config=>{
    config.headers['Content-Type']='application/json;charset=utf-8'
    config.headers['token']=JSON.parse(localStorage.getItem("Token"));
    return config
},error => {
    console.log(localStorage.getItem("Token"),'Token');
    console.error('request error: '+error)
    return Promise.reject(error)
    })
 export default request